package com.dk.service.impl;

import com.dk.mapper.TabSellerMapper;
import com.dk.pojo.TabSeller;
import com.dk.service.SellerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SellerServiceImpl implements SellerService {
    @Autowired
    TabSellerMapper sellerMapper;
    @Override
    public List<TabSeller> getInfo() {
        return sellerMapper.selectByExample(null);
    }

    @Override
    public int insertInfo(TabSeller seller) {
        return sellerMapper.insertSelective(seller);
    }

    @Override
    public TabSeller getInfoById(Integer id) {
        return sellerMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateSeller(TabSeller seller) {
        return sellerMapper.updateByPrimaryKeySelective(seller);
    }

    @Override
    public int deleteSellerById(Integer id) {
        return sellerMapper.deleteByPrimaryKey(id);
    }
}
